import { request } from '@/utils/request'

// 列表（所有状态）
export function pageList(param) {
	return request({
		url: '/page/list',
		method: 'post',
		data: param,
	})
}

// 列表（启用状态)
export function pageQuery(param) {
	return request({
		url: '/page/query',
		method: 'post',
		data: param,
	})
}

// 保存
export function pageSave(param) {
	return request({
		url: '/page/save',
		method: 'post',
		data: param,
		type: 2,
	})
}

// 页面详情
export function pageDetail(param) {
	return request({
		url: '/page/detail',
		method: 'post',
		data: param,
	})
}

// 页面展示
export function pageShow(param) {
	return request({
		url: '/page/show',
		method: 'post',
		data: param,
	})
}

// 页面删除
export function pageDelete(param) {
	return request({
		url: '/page/delete',
		method: 'post',
		data: param,
		type: 2,
	})
}

// 页面启用
export function pageEnable(param) {
	return request({
		url: '/page/enable',
		method: 'post',
		data: param,
		type: 2,
	})
}

// 页面停用
export function pageDisable(param) {
	return request({
		url: '/page/disable',
		method: 'post',
		data: param,
		type: 2,
	})
}

//  删除按钮
export function pageRemove(param) {
	return request({
		url: '/page/remove',
		method: 'post',
		data: param,
		type: 2,
	})
}

// 编辑按钮（权限判断）
export function editAut(param) {
	return request({
		url: '/role/editAut2',
		method: 'post',
		data: param,
	})
}

// 导出按钮
export function pageExport(param) {
	return request({
		url: '/page/export',
		method: 'post',
		data: param,
	})
}

// 获取表单 ID
export function getWorkRep(param) {
	return request({
		url: '/page/getWorkRep',
		method: 'post',
		data: param,
	})
}
export function pageImport(param) {
	return request({
		url: '/page/getWorkRep',
		method: 'post',
		data: param,
	})
}
